import { MenuItem } from '@/types';
import React from 'react';
import { Link } from 'react-router-dom';

interface LeftSidebarProps {
  menuItems?: MenuItem[];
}

const LeftSidebar: React.FC<LeftSidebarProps> = ({
  menuItems
}) => {

  return (
    <div className="left-sidebar">
      <h3>导航菜单</h3>
      <nav className="sidebar-nav">
        <ul>
          {menuItems?.map((item, index) => (
            <li key={index}>
              <Link to={item.path} className="sidebar-link">
                {item.label}
              </Link>
            </li>
          ))}
        </ul>
      </nav>
    </div>
  );
};

export default LeftSidebar;
